#ifndef __GAMEDESIGN_H__
#define __GAMEDESIGN_H__

#define SCREEN_HEIGHT	600
#define SCREEN_WIDTH	1024
#define WINDOW_NAME		"School Battle"

//STARTING
#define ATTRIB_START_VALUE 1
#define HEALTH_START_VALUE 30
#define MANA_START_VALUE 20
#define SPEED_START_VALUE 5
#define ATTACK_START_VALUE 5
#define MAX_MOV 3
#define MAX_ATK 2
#define MOVE_TIME_LAPSE_DEFAULT 3000 //Milliseconds
#define ATTACK_TIME_LAPSE_DEFAULT 2000
#define AC_DEFAULT 1500
#define MC_DEFAULT 1000
#define HC_DEFAULT 1000

//CENTER PLAYER
#define CENTER_X 450
#define CENTER_Y 450

//STAT CALCULATIONS
#define MTL_CALC(spd)	(spd/10 * 50)
#define ATL_CALC(spd)	(spd/10 * 70)
#define MM_CALC(pep)	(pep/10)
#define MA_CALC(pep)	(pep/15)
#define AC_CALC(spd)	(spd/15)*70
#define MC_CALC(spd)	(spd/10)*50
#define HC_CALC(pep)	(pep/10)*80

//RANKING
#define RANK_A_STREAK	12
#define RANK_B_STREAK	10
#define RANK_C_STREAK	8
#define RANK_D_STREAK	6
#define RANK_E_STREAK	4
#define RANK_F_STREAK	2

//MISC
#define MAX_ATTACK 10
#define ADD_PER_DAY 1
#define DEFAULT_DAILY_POINT 10
#define POINT_SUBTRACT_VALUE_MAIN 3
#define POINT_SUBTRACT_VALUE_SUB 1
#define RANGE_DAMAGE_VALUE 3

//HP Bars and MP
#define HP_RECT_W	350
#define HP_RECT_H	20
#define MP_RECT_W	350
#define MP_RECT_H	20
#define HP_BOX_X_P1	20
#define HP_BOX_Y_P1	50
#define HP_BOX_X_P2	SCREEN_WIDTH-HP_RECT_W-HP_BOX_X_P1
#define HP_BOX_Y_P2 HP_BOX_Y_P1
#define MP_BOX_X_P1	HP_BOX_X_P1
#define MP_BOX_Y_P1	HP_BOX_Y_P1+HP_RECT_H
#define MP_BOX_X_P2	HP_BOX_X_P2
#define MP_BOX_Y_P2	HP_BOX_Y_P2+HP_RECT_H

//MISC LOCATIONS
#define MOVE_S_X_P1	20
#define MOVE_S_Y_P1	140
#define MOVE_S_X_P2	SCREEN_WIDTH-MOVE_S_X_P1
#define MOVE_S_Y_P2 MOVE_S_Y_P1
#define ATTACK_S_X_P1 20
#define ATTACK_S_Y_P1 260
#define ATTACK_S_X_P2 SCREEN_WIDTH-ATTACK_S_X_P1
#define ATTACK_S_Y_P2 ATTACK_S_Y_P1


//TODO:Change this!! It's so ugly!!
//SPRITELOC
const int boxidlew = 93;
const int boxidleh = 80;
const int boxidlex = 6;
const int boxidley = 11;
const int boxmovew = 111;
const int boxmoveh = 70;
const int boxmovex = 5;
const int boxmovey = 245;
const int boxattackw = 118;
const int boxattackh = 108;
const int boxattackx = 382;
const int boxattacky = 104;
const int boxhitw = 85;
const int boxhith = 73;
const int boxhitx = 13;
const int boxhity = 342;
//Enemy
const int eboxidlew = 89;
const int eboxidleh = 87;
const int eboxidlex = 5;
const int eboxidley = 28;
const int eboxmovew = 101;
const int eboxmoveh = 92;
const int eboxmovex = 578;
const int eboxmovey = 254;
const int eboxattackw = 110;
const int eboxattackh = 120;
const int eboxattackx = 90;
const int eboxattacky = 376;
const int eboxhitw = 99;
const int eboxhith = 90;
const int eboxhitx = 1;
const int eboxhity = 137;

#define FACE_ARROW_WIDTH 50
#define FACE_ARROW_HEIGHT 50
#define FACE_ARROW_RIGHT_X 264
#define FACE_ARROW_RIGHT_Y 628
#define FACE_ARROW_UP_X FACE_ARROW_RIGHT_X + FACE_ARROW_WIDTH
#define FACE_ARROW_UP_Y FACE_ARROW_RIGHT_Y
#define FACE_ARROW_DOWN_X FACE_ARROW_UP_X + FACE_ARROW_WIDTH
#define FACE_ARROW_DOWN_Y FACE_ARROW_RIGHT_Y
#define FACE_ARROW_LEFT_X FACE_ARROW_DOWN_X + FACE_ARROW_WIDTH
#define FACE_ARROW_LEFT_Y FACE_ARROW_RIGHT_Y


//STAGE
#define STAGE_ROW 10
#define STAGE_COL 10
#define BOX_SIZE 100

#define STAGE_ROW_3D 9
#define STAGE_COL_3D 9
#define BOX_SIZE_3D 20

//NAME LOCATION
#define PLAYER_NAME_LOCATION_X HP_BOX_X_P1
#define PLAYER_NAME_LOCATION_Y 20
#define ENEMY_NAME_LOCATION_X HP_BOX_X_P2
#define ENEMY_NAME_LOCATION_Y PLAYER_NAME_LOCATION_Y

#define NAME_BOX_X SCREEN_WIDTH/2
#define NAME_BOX_Y 250

//MOVEMENT
enum EMOVE
{
	MOVE_NONE = -1,
	MOVE_ATTACK = 0, //Means the player attacked
	MOVE_UP,
	MOVE_DOWN,
	MOVE_LEFT,
	MOVE_RIGHT,
	MOVE_COUNT
};

//STAGE STATUS
enum SSTATUS
{
	STAGE_FREE = 0,
	STAGE_OCCUPIED,
	STAGE_PLAYER,
	STAGE_COUNT
};

//PLAYER STATUS
enum PSTATUS
{
	STATUS_IDLE = 0,
	STATUS_MOVE,
	STATUS_ATTACK,
	STATUS_HIT,
	STATUS_SKILL,
	STATUS_COUNT
};

//Player Front
enum PFACE
{
	FACE_UP = 0,
	FACE_DOWN,
	FACE_LEFT,
	FACE_RIGHT,
	FACE_COUNT
};

//Character Creation states
enum CCSTATES
{
	CNAME = 0,
	CCLASS,
	CCOUNT
};

//STATES
enum GSTATES
{
	GSMAINMENU = 0,
	GSWEEKDAY,
	GSSATURDAY,
	GSSUNDAY,
	GSDUELSELECT,
	GSBATTLEMODE,
	GSTATES_COUNT
};
//DAY TIME
enum DAYTIME
{
	DAYTIME_MORNING = 0,
	DAYTIME_AFTERSCHOOL,
	DAYTIME_EVENING,
	DAYTIME_COUNT
};
//ATTRIBUTES
enum ATTRIB
{
	ATTRIB_MATH = 0,
	ATTRIB_SCIENCE,
	ATTRIB_PE,
	ATTRIB_COUNT
};

enum RCHANGE
{
	RCHANGE_NONE = 0,
	RCHANGE_UP,
	RCHANGE_DOWN,
	RCHANGE_COUNT
};

//RANKING
enum RANK
{
	RANK_F = 0,
	RANK_E,
	RANK_D,
	RANK_C,
	RANK_B,
	RANK_A,
	RANK_COUNT
};

enum DAYS
{
	DAYS_MONDAY = 0,
	DAYS_TUESDAY,
	DAYS_WEDNESDAY,
	DAYS_THURSDAY,
	DAYS_FRIDAY,
	DAYS_SATURDAY,
	DAYS_SUNDAY,
	DAYS_COUNT
};

#define PLAYER Game::GetInstance()->GetPlayer()
#define DEVICE Game::GetDevice()
#define AIPLAYER Game::GetInstance()->GetEnemyPlayer()->GetInstance()
#define AI_PLAY Game::GetInstance()->GetEnemyPlayer()

#endif